import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { MarshalException } from "../../Engine/RMI/MarshalException";
type int = number;
//class EMapRestrictionType
    
    export  class EMapRestrictionType
    {
        constructor(arg1: int)
        {
            
            this.__value = arg1;
            return;
        }

        public value(): int
        {
            return this.__value;
        }

        public __write(arg1: SerializeStream): void
        {
            arg1.writeShort(this.__value);
            return;
        }

        public static convert(arg1: int): EMapRestrictionType
        {
            return new EMapRestrictionType(arg1);
        }

        public static __read(arg1: SerializeStream): EMapRestrictionType
        {
            var loc1=arg1.readShort();
            if (loc1 < 0 || loc1 >= 513) 
            {
                throw new MarshalException();
            }
            return EMapRestrictionType.convert(loc1);
        }

        public static /* const */_EMapRestrictionTypeSave: int=1;

        public static /* const */_EMapRestrictionTypePK: int=2;

        public static /* const */_EMapRestrictionTypeGroup: int=4;

        public static /* const */_EMapRestrictionTypePass: int=8;

        public static /* const */_EMapRestrictionTypeSingleMount: int=16;

        public static /* const */_EMapRestrictionTypeTransformMount: int=32;

        public static /* const */_EMapRestrictionTypeFlyMount: int=64;

        public static /* const */_EMapRestrictionTypeTransform: int=128;

        public static /* const */_EMapRestrictionTypeRevivalInSitu: int=256;

        public static /* const */_EMapRestrictionTypeRevivalInBackToTheCity: int=512;

        public /* var */__value: int;
    }
